<template>
  <div class="nav"> 
      
        <ul>
          <li ref="demo" @click="fun()">热门</li>
          <li>爱豆</li>
          <li>二次元</li>
          <li>影视</li>
        </ul>
      </div>
</template>

<script>
export default {
methods: {
  fun(){
    console.log(this.$refs.demo.value)
  }
},
}
</script>

<style scoped>

.nav>ul{
  display: flex;
  justify-content: center;
  margin-top: .1rem;
}
.nav>ul>li{
  flex: 1;
  text-align: center;
  font-size: .15rem;
}
</style>